//
//  OAAccountChangeVC.m
//  OA项目
//
//  Created by innofive on 2018/4/12.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OAAccountChangeVC.h"
#import "OAAccountChangePwsVC.h"

@interface OAAccountChangeVC ()

@end

@implementation OAAccountChangeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)onLoadViewByWillAppear:(UIView *)view
{
    view.backgroundColor = hexCOLOR(@"F1F1F1");
    
    UIImageView *imageV = ({
        UIImageView *l = [UIImageView new];
        l.image = IMAGE(@"shoujihao");
        [view addV:l];
        l;
    });
    
    UILabel *label = ({
        UILabel *l = [UILabel new];
        l.text = @"您的手机号:  18576705970";
        l.font = kSysFont(kFitW(13));
        l.textColor = hexCOLOR(@"767676");
        l.textAlignment = NSTextAlignmentCenter;
        [view addV:l];
        l;
    });
    
    UIButton *button = ({
        UIButton *l = [UIButton buttonWithType:UIButtonTypeCustom];
        l.cornerRadius = 3;
        l.masksToBounds = YES;
        [l setNormalTitle:@"更换手机号"];
        [l AddTarget:self Action:@selector(onLoginOut:)];
        l.backgroundColor  = hexCOLOR(@"D4A451");
        [view addV:l];
        l;
    });
    
    UILabel *label1 = ({
        UILabel *l = [UILabel new];
        l.text = @"更换手机号后,登录手机号和企业通讯录号码均可改变";
        l.font = kSysFont(kFitW(12));
        l.textColor = hexCOLOR(@"767676");
        l.textAlignment = NSTextAlignmentCenter;
        [view addV:l];
        l;
    });
    
    
    
    [self onMainQueueAddSub:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        imageV.size = CGSizeMake(kFitW(55), kFitH(80));
        imageV.top = kFitH(65);
        imageV.centerX = size.width/2;
        
        [label sizeToFit];
        label.centerX = size.width/2;
        label.top = imageV.bottom+kFitH(13);
    
        button.size = CGSizeMake(size.width-kFitW(70), kFitH(40));
        button.centerX = size.width/2;
        button.top = label.bottom+kFitH(35);
       
        [label1 sizeToFit];
        label1.centerX = size.width/2;
        label1.top = button.bottom+kFitH(13);
        
    }];
    
    
}
-(void)onLoginOut:(UIButton *)button
{
    OAAccountChangePwsVC *vc = [[OAAccountChangePwsVC alloc]initWithStyle:(UITableViewStyleGrouped) Type:openTypePws];
    vc.title = self.title;
    [self pushToVC:vc];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
